﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System.ComponentModel;
using System.Xml;
using FinPlusInterfaces;
using FinPlusCompCore;

namespace FinPlusCompTDD
{
    //TODO under construction
    public class FinPlusPodStub : FinPlusComponent, IFinPlusConnect
    {
        [State(Test = true)]
        public override bool IsValid { get; set; }
        [State(Test = true)]
        public override string TestString { get { return Adapter.ToString(); } }
        public override IPods Adapter { get { return _adapter.ToPods(); } }
        public bool CanWrite { get { return _conn.CanWrite; } }

        private readonly IFinPlusConnect _conn;
        private readonly IDPods _adapter;
        private XmlDocument _xmlDoc;
        private XmlNode _xmlTran;
        private string _name, _path;

        //construct
        public FinPlusPodStub(string name)
        {
        }

        //common control interface
        public override void Dispose(){ }

        //public
        public IDPods DPods() { return _conn.DPods(); }

        public IPods Pods() { return _conn.DPods().ToPods(); }

        //events
        private void Pod_Changed(object s, PropertyChangedEventArgs a)
        {

        }
    }
}
